import Vue from 'vue'
import VueRouter from 'vue-router'
import Layout from '@/views/Layout'
import FindRoom from '@/views/FindRoom'
import HomePage from '@/views/HomePage'
import My from '@/views/My'
import HkZx from '@/views/HkZx'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    redirect: '/layout'
  },
  {
    path: '/layout',
    component: Layout,
    children: [
      {
        path: '/',
        redirect: '/layout/HomePage'
      },
      {
        path: '/layout/HomePage',
        component: HomePage
      },
      {
        path: '/layout/FindRoom',
        component: FindRoom
      },
      {
        path: '/layout/HkZx',
        component: HkZx
      },
      {
        path: '/layout/My',
        component: My
      }
    ]
  }
]

const router = new VueRouter({
  routes
})

export default router
